package com.h5lib.jdbc.ormlite;

import java.sql.SQLException;

import com.j256.ormlite.db.DatabaseType;
import com.j256.ormlite.db.SqliteDatabaseType;
import com.j256.ormlite.jdbc.JdbcConnectionSource;

/**
 * 
 * @author farmer
 *
 */
public class SqliteJdbcConnectionSource extends JdbcConnectionSource{
	
	private static DatabaseType databaseType;
	
	static{
		try {
			Class.forName("android.os.Build");
			databaseType = new SqliteDroidDatabaseType();
		} catch (ClassNotFoundException e) {
			databaseType = new SqliteDatabaseType();
		}
	}
	
	/**
	 * 初始化参数
	 * @param url
	 * @throws SQLException
	 */
	public SqliteJdbcConnectionSource(String url) throws SQLException {		
		super(url,databaseType);
	}
	
}
